package com.zx.yixun.ui.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zx.yixun.R;
import com.zx.yixun.data.LineDatabean;

public class RunLineBottomAdapter extends BaseQuickAdapter<LineDatabean, BaseViewHolder> {
    public RunLineBottomAdapter() {
        super(R.layout.item_runlinetop);
    }

    @Override
    protected void convert(BaseViewHolder helper, LineDatabean item) {
        ImageView iv_bg = helper.getView(R.id.iv_bg);
        if (helper.getAdapterPosition()==0){
            iv_bg.setImageResource(R.mipmap.line_leftnbottom);
        }else if (helper.getAdapterPosition()==getData().size()-1){
            iv_bg.setImageResource(R.mipmap.line_rightbottom);
        }else {
            iv_bg.setImageResource(R.mipmap.line_bottom_normal);
        }
    }
}
